<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- <input type="text"> -->
</body>
</html>
<script>
    class One {
        constructor(obj , ele){
            this.obj = null
            // this.input = document.querySelector(ele)
            // this.timeid = null
            // this.name = null
            this.clone(obj)
            return this.obj
        }
        clone(obj){
            var obj2 = Array.isArray(obj)? [] : {}
            for(var key in obj){
                if(obj[key] == 'object'){
                    obj2[key] = this.clone(obj[key])
                }else{
                    obj2[key] = obj[key]
                }
            }
            this.obj = obj2
        }
        // time(){
        //     this.input.oninput = ()=>{
        //         if(this.timeid == null){
        //             this.name = setTimeout(()=>{
        //                 this.timeid = 1
        //                 return this.obj
        //             },300)

        //         }
        //     }
        // }
    }

    var obj = {
        name : '嘎嘎',
        age : '乱杀',
        habby : ['就这' , '呵呵']
    }
    
    var res = new One(obj)
    var res1 = new One(obj)
    var res2 = new One(obj)
    var res3 = new One(obj)
    console.log(res,res1,res2,res3);
</script>